<?php

declare(strict_types=1);

namespace App\Command;

use App\Modules\StatDoris\Model\CallDetail;
use Hyperf\Command\Command as HyperfCommand;
use Hyperf\Command\Annotation\Command;
use Psr\Container\ContainerInterface;

/**
 * @Command
 */
#[Command]
class DataSyncCommand extends HyperfCommand
{
    /**
     * @var ContainerInterface
     */
    protected $container;

    /**
     * @var string
     */
    protected $name = 'app:sync-to-doris';

    public function __construct(ContainerInterface $container)
    {
        $this->container = $container;

        parent::__construct('app:sync-to-doris');
    }

    public function configure()
    {
        parent::configure();
        $this->setDescription('Hyperf Demo Command');
    }

    // php73 bin/hyperf.php app:sync-to-doris
    public function handle()
    {
        $ret = CallDetail::getCallDetailById(36);
        echo "<pre>";
        print_r($ret);
        exit;
    }
}
